import { Column, Entity, PrimaryGeneratedColumn } from 'typeorm';

@Entity()
export class Props {
	@PrimaryGeneratedColumn("uuid")
	id: string;

	@Column('text')
	prop_id: string;

	@Column('text')
	doc_id: string;

	@Column('text')
	parent_id: string;

	@Column({ type: 'text', comment: '区分为参数属性还是返回值属性' })
	class: string;

	@Column({ type: 'text', comment: '字段属性' })
	prop: string;

	@Column({ type: 'int', comment: '是否必填' })
	required: number;

	@Column({ type: 'text', comment: '字段类型' })
	type: string;

	@Column({ type: 'text', default: null, comment: '提前约定的可选值' })
	optional: string;

	@Column({ type: 'text', default: null, comment: '字段注释' })
	label: string;

	@Column({ type: 'text', default: null, comment: '备注' })
	note: string;

}